<?php $this->load->view('common/head');?>
<form class="form-inline" name="actionEdit" id="actionEdit" action="<?php echo $this->input->server('REQUEST_URI'); ?>" method="post">
  <input type="hidden" name="id" id="id" value="<?=$data['id']?>">
  <table class="table ">
    <thead>
      <tr>
        <th colspan="2">标准动作编辑</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><label for="year" class="control-label">年份：</label></td>
        <td>
            <select class="form-control" placeholder=".col-xs-4" id="year" name="year">
            </select>
        </td>
      </tr>
      <tr>
        <td><label for="timeUnit" class="control-label">双月：</label></td>
        <td>
          <select class="form-control" placeholder=".col-xs-4" id="timeUnit" name="timeUnit">
          </select>
        </td>
      </tr>
      <tr>
        <td><label for="timeUnit" class="control-label">基金类型：</label></td>
        <td>
          <label class="radio-inline">
            <input type="radio" name="type" id="type1" value="1" <?=$data['type']==1 ? 'checked="checked"' : ''?>>单店基金
          </label>
          <label class="radio-inline">
            <input type="radio" name="type" id="type2" value="2" <?=$data['type']==2 ? 'checked="checked"' : ''?>>专项基金
          </label>
          <label class="radio-inline">
            <input type="radio" name="type" id="type3" value="3" <?=$data['type']==3 ? 'checked="checked"' : ''?>>城市基金
          </label>
        </td>
      </tr>
      <tr>
        <td><label for="name" class="control-label">标准动作名称:</label></td>
        <td>
        	<input type="input" class="form-control" name="name" id="name" value="<?=$data['name'];?>" placeholder="标准动作名称"> 
        </td>
      </tr>
      <tr>
        <td><label for="name" class="control-label">排序:</label></td>
        <td>
        	<input type="input" class="form-control" name="orderNum" id="orderNum" value="<?=$data['orderNum'];?>" placeholder="排序"> 
        </td>
      </tr>
      <tr>
        <td colspan="2" class="text-center">
          <button type="button" onclick="ajaxFormSubmit('actionEdit')" class="btn btn-default btn-primary">保存</button>        
        </td>
        <td></td>
      </tr>
    </tbody>
  </table>
</form>
<script type="text/javascript">
  $(function(){
    loadYearList('year',<?=isset($data) ? $data['year'] : 0?>);
    loadTimeUnitList('timeUnit',<?=isset($data) ? $data['year'] : 0?>,<?=isset($data) ? $data['timeUnit'] : 0?>);
  });
  $("#year").change(function(){
      loadTimeUnitList('timeUnit',this.value);
    });
</script>
<?php $this->load->view('common/foot');?>